﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="EmployeeInfoManager.aspx.cs" Inherits="AirCondition.HR.EmployeeInfoManager" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>员工信息管理</title>
    <style type="text/css">
body { font-family: Verdana; font-size: 12px; line-height: 1.5; }
a { color: #000; text-decoration: none; }
a:hover { color: #F00; }
#menu { width:500px; height:28px; margin:0 auto; border-bottom:3px solid #E10001;}
#menu ul { list-style: none; margin: 0px; padding: 0px; }
#menu ul li { float:left; margin-left:2px;}
#menu ul li a { display:block; width:87px; height:28px; line-height:28px; text-align:center; background:url(images/2010-08/17/091033_nav_bg2.gif) 0 0 no-repeat; font-size:14px;}
#menu ul li a:hover { background:url(images/2010-08/17/091033_nav_bg3.gif) 0 0 no-repeat;}
#menu ul li a#current { background:url(images/2010-08/17/091033_nav_bg1.gif) 0 0 no-repeat; font-weight:bold; color:#fff;}
</style>

</head>
<body>
   
    <form id="form1" runat="server">
    <div id="menu">
<ul>
<li><a href="#">首页</a></li>
<li><a href="ProjectManager.aspx">工程项目管理</a></li>
<li><a href="EmployeeManagerInfo.aspx">薪酬体系管理</a></li>
<li><a href="#">查询统计报表</a></li>
<li><a href="#">系统管理</a></li>
</ul>
</div>

<div>
    <asp:GridView ID="GridView1" runat="server" AllowPaging="True" 
        AutoGenerateColumns="False" CellPadding="4" DataKeyNames="eid" 
        DataSourceID="SqlDataSource1" ForeColor="#333333" GridLines="None">
        <RowStyle BackColor="#EFF3FB" />
        <Columns>
            <asp:CommandField ShowDeleteButton="True" ShowEditButton="True" />
            <asp:BoundField DataField="eid" HeaderText="eid" SortExpression="eid" 
                InsertVisible="False" ReadOnly="True">
            </asp:BoundField>
            <asp:BoundField DataField="ename" HeaderText="姓名" SortExpression="ename" />
            <asp:BoundField DataField="egender" HeaderText="性别" SortExpression="egender" />
            <asp:BoundField DataField="ebirth" HeaderText="生日" SortExpression="ebirth" />
            <asp:BoundField DataField="enativeplace" HeaderText="籍贯" 
                SortExpression="enativeplace" />
            <asp:BoundField DataField="eidentification" HeaderText="身份证" 
                SortExpression="eidentification" />
            <asp:BoundField DataField="estatus" HeaderText="状态" SortExpression="estatus" />
            <asp:BoundField DataField="ecellphone" HeaderText="手机" 
                SortExpression="ecellphone" />
            <asp:BoundField DataField="etelephone" HeaderText="电话" 
                SortExpression="etelephone" />
            <asp:BoundField DataField="eaddress" HeaderText="地址" 
                SortExpression="eaddress" />
            <asp:BoundField DataField="edepartment" HeaderText="部门" 
                SortExpression="edepartment" />
            <asp:BoundField DataField="eposition" HeaderText="职位" 
                SortExpression="eposition" />
            <asp:BoundField DataField="ejobtype" HeaderText="工种" 
                SortExpression="ejobtype" />
            <asp:BoundField DataField="esalary" HeaderText="工资" SortExpression="esalary" />
            <asp:BoundField DataField="ecardname" HeaderText="银行卡姓名" 
                SortExpression="ecardname" />
            <asp:BoundField DataField="esalarycard" HeaderText="银行卡号" 
                SortExpression="esalarycard" />
            <asp:BoundField DataField="esalarycardbank" HeaderText="开户行" 
                SortExpression="esalarycardbank" />
            <asp:BoundField DataField="ecardpoint" HeaderText="开户地点" 
                SortExpression="ecardpoint" />
            <asp:BoundField DataField="ecardownerrelationship" HeaderText="与持卡人关系" 
                SortExpression="ecardownerrelationship" />
        </Columns>
        <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
        <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
        <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
        <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
        <EditRowStyle BackColor="#2461BF" />
        <AlternatingRowStyle BackColor="White" />
    </asp:GridView>
    <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
        ConnectionString="Data Source=FANTASY\FANTASY;Initial Catalog=sc_hr;Persist Security Info=True;User ID=sa;Password=sa123" 
        DeleteCommand="DELETE FROM [tb_EemployeeInfo] WHERE [eid] = @eid" 
        InsertCommand="INSERT INTO [tb_EemployeeInfo] ([ename], [egender], [ebirth], [enativeplace], [eidentification], [estatus], [ecellphone], [etelephone], [eaddress], [edepartment], [eposition], [ejobtype], [esalary], [ecardname], [esalarycard], [esalarycardbank], [ecardpoint], [ecardownerrelationship]) VALUES (@ename, @egender, @ebirth, @enativeplace, @eidentification, @estatus, @ecellphone, @etelephone, @eaddress, @edepartment, @eposition, @ejobtype, @esalary, @ecardname, @esalarycard, @esalarycardbank, @ecardpoint, @ecardownerrelationship)" 
        ProviderName="System.Data.SqlClient" 
        SelectCommand="SELECT [ename], [eid], [egender], [ebirth], [enativeplace], [eidentification], [estatus], [ecellphone], [etelephone], [eaddress], [edepartment], [eposition], [ejobtype], [esalary], [ecardname], [esalarycard], [esalarycardbank], [ecardpoint], [ecardownerrelationship] FROM [tb_EemployeeInfo]" 
        
        UpdateCommand="UPDATE [tb_EemployeeInfo] SET [ename] = @ename, [egender] = @egender, [ebirth] = @ebirth, [enativeplace] = @enativeplace, [eidentification] = @eidentification, [estatus] = @estatus, [ecellphone] = @ecellphone, [etelephone] = @etelephone, [eaddress] = @eaddress, [edepartment] = @edepartment, [eposition] = @eposition, [ejobtype] = @ejobtype, [esalary] = @esalary, [ecardname] = @ecardname, [esalarycard] = @esalarycard, [esalarycardbank] = @esalarycardbank, [ecardpoint] = @ecardpoint, [ecardownerrelationship] = @ecardownerrelationship WHERE [eid] = @eid">
        <DeleteParameters>
            <asp:Parameter Name="eid" Type="Int32" />
        </DeleteParameters>
        <UpdateParameters>
            <asp:Parameter Name="ename" Type="String" />
            <asp:Parameter Name="egender" Type="String" />
            <asp:Parameter Name="ebirth" Type="String" />
            <asp:Parameter Name="enativeplace" Type="String" />
            <asp:Parameter Name="eidentification" Type="String" />
            <asp:Parameter Name="estatus" Type="String" />
            <asp:Parameter Name="ecellphone" Type="String" />
            <asp:Parameter Name="etelephone" Type="String" />
            <asp:Parameter Name="eaddress" Type="String" />
            <asp:Parameter Name="edepartment" Type="String" />
            <asp:Parameter Name="eposition" Type="String" />
            <asp:Parameter Name="ejobtype" Type="String" />
            <asp:Parameter Name="esalary" Type="String" />
            <asp:Parameter Name="ecardname" Type="String" />
            <asp:Parameter Name="esalarycard" Type="String" />
            <asp:Parameter Name="esalarycardbank" Type="String" />
            <asp:Parameter Name="ecardpoint" Type="String" />
            <asp:Parameter Name="ecardownerrelationship" Type="String" />
            <asp:Parameter Name="eid" Type="Int32" />
        </UpdateParameters>
        <InsertParameters>
            <asp:Parameter Name="ename" Type="String" />
            <asp:Parameter Name="egender" Type="String" />
            <asp:Parameter Name="ebirth" Type="String" />
            <asp:Parameter Name="enativeplace" Type="String" />
            <asp:Parameter Name="eidentification" Type="String" />
            <asp:Parameter Name="estatus" Type="String" />
            <asp:Parameter Name="ecellphone" Type="String" />
            <asp:Parameter Name="etelephone" Type="String" />
            <asp:Parameter Name="eaddress" Type="String" />
            <asp:Parameter Name="edepartment" Type="String" />
            <asp:Parameter Name="eposition" Type="String" />
            <asp:Parameter Name="ejobtype" Type="String" />
            <asp:Parameter Name="esalary" Type="String" />
            <asp:Parameter Name="ecardname" Type="String" />
            <asp:Parameter Name="esalarycard" Type="String" />
            <asp:Parameter Name="esalarycardbank" Type="String" />
            <asp:Parameter Name="ecardpoint" Type="String" />
            <asp:Parameter Name="ecardownerrelationship" Type="String" />
        </InsertParameters>
    </asp:SqlDataSource>
</div>

    <asp:Button ID="Button1" runat="server" Text="新增" onclick="Button1_Click" />

    </form>

</body>
</html>
